home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / amos / AMOSL0595.lzh / AMOSLIST / 000053_amos-request@svcs1.digex.net_Sat May 13 23:11:08 1995.msg < prev    next >
Internet Message Format  |  1995-06-01  |  5KB

  1. Received: from svcs1.digex.net by www1.access.digex.net with SMTP id AA08107
  2.   (5.67b8/IDA-1.5); Sat, 13 May 1995 23:11:07 -0400
  3. Received: by svcs1.digex.net id AA11040
  4.   (5.67b8/IDA-1.5 for amos-out); Sat, 13 May 1995 19:16:57 -0400
  5. Received: from www1.access.digex.net by svcs1.digex.net with SMTP id AA11036
  6.   (5.67b8/IDA-1.5 for <amos-list@svcs1.digex.net>); Sat, 13 May 1995 19:16:55 -0400
  7. Received: from pan.otol.fi by www1.access.digex.net with SMTP id AA29087
  8.   (5.67b8/IDA-1.5 for <amos-list@access.digex.com>); Sat, 13 May 1995 19:16:47 -0400
  9. Received: from janus.otol.fi (tumu@janus.otol.fi [193.64.226.249]) by pan.otol.fi (8.6.12/8.6.9) with ESMTP id CAA23851 for <amos-list@access.digex.com>; Sun, 14 May 1995 02:16:51 +0300
  10. Received: (from tumu@localhost) by janus.otol.fi (8.6.9/8.6.9) id CAA14221; Sun, 14 May 1995 02:16:41 +0300
  11. Date: Sun, 14 May 1995 02:16:41 +0300 (EET DST)
  12. From: Tumu / BFB <tumu@janus.otol.fi>
  13. To: AMOS Mailing list <amos-list@access.digex.net>
  14. Subject: REQTOOLS INTERFACE FOR AMOSPRO
  15. Message-Id: <Pine.SUN.3.90.950514020852.14217A@janus.otol.fi>
  16. Mime-Version: 1.0
  17. Content-Type: TEXT/PLAIN; charset=US-ASCII
  18. Status: RO
  19. X-Status: 
  20.  
  21.  
  22. Here it is, Reqtools interface for AmosPro. 
  23.  
  24. I will update it like adding matchpatterns, but it hasn't got much hurry.
  25.  
  26. If you're using this piece of code in your progs, please credit me in 
  27. information texts. 
  28.  
  29. This piece of code is PUBLIC DOMAIN, so you can't take any money from it 
  30. except some cost for disks and postage.
  31.  
  32.     Tumu / BFB Team <tumu@janus.otol.fi>
  33.  
  34. ------------------------ cut here --------------------------
  35.  
  36. ' reqtools interface by tumu / bfb team <tumu@janus.otol.fi> 
  37. ' version 1.0 - public domain
  38.  
  39. ' bfb team productions 1995
  40. ' bfb team www page: http://lyyra.kempele.fi/~quaid/ 
  41.  
  42. ' reqtools.library is copyrighted by Nico Francois
  43.  
  44. ' requires make's lib extension! _rtfilereq uses it's mem allocation routines  
  45. '                            (reserves 108 bytes for filename)   
  46.  
  47. ' make's lib can be ftped from nic.funet.fi
  48. '                              /pub/amiga/programming/amos/makelib.lha   
  49.  
  50. ' procedures:
  51. '             _rtallocrequest[type_of_requester] 
  52. '             ; allocates needed buffers for requesters
  53. '               type = 0 - file requester  
  54. '                      1 - easy requester
  55. '                      2 - font requester (not available)
  56. '                      3 - screenmode req. (not available) 
  57. '             ; returns in Param the address of the buffer or null if
  58. '               no memory
  59.  
  60. '             _rtezrequest[requester_string,gadget_strings,titlebar_str, 
  61. '                          request_buffer] 
  62. '             ; use easy requester 
  63. '               requester_string - requester string
  64. '               gadget_string    - gadget string (gads seperated by '|')   
  65. '                                  (example: "Ok|Cancel")
  66. '               titlebar_str     - titlebar string 
  67. '               request_buffer   - address returned by _rtallocrequest 
  68.  
  69. '             _rtfilerequest[titlestr,request_buffer]
  70. '             ; use file requester 
  71. '               titlestr - title string
  72. '               request_buffer - address returned by _rtallocrequest 
  73. '             ; return: returns 1 in Param if user selected a file 
  74. '                       _rtfile$ contains filename 
  75. '                       _rtdir$ contains directoryname 
  76.  
  77. '             _rtfreerequest[request_buffer] 
  78. '             ; deallocates request buffer 
  79. '               request_buffer - address returned by _rtallocrequest 
  80.  
  81. Amos To Back 
  82.  
  83. Lib Open 1,"reqtools.library",0
  84.  
  85. _RTALLOCREQUEST[0]
  86. _REQBUFFER=Param
  87.  
  88. If _REQBUFFER<=0
  89.    Amos To Front 
  90.    Print "no enough mem for reqbuffer"
  91.    End 
  92. End If 
  93.  
  94. _RTFILEREQUEST["BFB Team productions 1995",_REQBUFFER]
  95.  
  96. Print Param,_RTDIR$+"/"+_RTFILE$
  97.  
  98. _RTFREEREQUEST[_REQBUFFER]
  99.  
  100. Amos To Front 
  101.  
  102. Procedure _RTALLOCREQUEST[TYPE]
  103.    ' rt_filereq - equ 0 ; file requester  
  104.    ' rt_reqinfo - equ 1 ; easy requester
  105.    
  106.    Dreg(0)=TYPE
  107.    Areg(0)=0
  108.    
  109.    RES=Lib Call(1,-$1E)
  110.    
  111. End Proc[RES]
  112. Procedure _RTEZREQUEST[_REQ$,_GADS$,_TITLE$,_REQBUFFER]
  113.    
  114.    Areg(1)=Varptr(_REQ$)
  115.    Areg(2)=Varptr(_GADS$)
  116.    Areg(3)=_REQBUFFER
  117.    Areg(4)=0
  118.    Areg(0)=0
  119.    
  120.    X=Free
  121.    Loke _REQBUFFER+12,Varptr(_TITLE$)
  122.    
  123.    RES=Lib Call(1,-$42)
  124.    
  125. End Proc[RES]
  126. Procedure _RTFILEREQUEST[_TITLE$,_REQBUFFER]
  127.    
  128.    Shared _RTFILE$,_RTDIR$,_RTFILENAMEPTR
  129.    
  130.    If _RTFILENAMEPTR=0
  131.       _RTFILENAMEPTR=Ma Malloc(108,Mem Public+Mem Clear)
  132.    End If 
  133.    
  134.    If _RTFILENAMEPTR=0
  135.       Pop Proc[-1]
  136.    End If 
  137.    
  138.    _TITLE$=_TITLE$+Chr$(0)
  139.    
  140.    Areg(0)=0
  141.    Areg(1)=_REQBUFFER
  142.    Areg(2)=_RTFILENAMEPTR
  143.    
  144.    X=Free
  145.    Areg(3)=Varptr(_TITLE$)
  146.    
  147.    RES=Lib Call(1,-$36)
  148.    
  149.    If RES=1
  150.       _RTFILE$=Elmem$(_RTFILENAMEPTR,108,0)
  151.       _RTDIR$=Elmem$(Leek(_REQBUFFER+16),108-Len(_RTFILE$),0)
  152.    End If 
  153.    
  154. End Proc[RES]
  155. Procedure _RTFREEREQUEST[_REQBUFFER]
  156.    
  157.    Shared _RTFILENAMEPTR
  158.    
  159.    Areg(1)=_REQBUFFER
  160.    
  161.    RES=Lib Call(1,-$24)
  162.    
  163.    If _RTFILENAMEPTR>0 Then Ma Free _RTFILENAMEPTR
  164.    
  165. End Proc
  166.